<template>
  <div class="container"></div>
</template>
<script>
import { authorize, getAuthorize } from "@/api/login";
import { setTenantId,getTenantId } from "@/utils/auth";
export default {
  created() {
    //setTenantId(1)
    //console.log(getTenantId(),"*-**-*-*-*-");
    this.empower();
  },
  methods: {
    empower() {
      let data = {
        response_type: this.$route.query.response_type,
        client_id: this.$route.query.client_id,
        redirect_uri: this.$route.query.redirect_uri,
        auto_approve: false,
        state:this.$route.query.state,
        scope: { "user.read": true, "user.write": true },
      };
      authorize(data).then((res) => {
        const href = res.data
        //alert(href)
          if (!href) {
            return;
          }
          location.href = href
      });
    },
  },
};
</script>